from urllib.request import urlopen
import bs4
html = urlopen("http://www.weather.com.cn/weather1d/101280101.shtml#dingzhi_first").read().decode('utf-8')
soup = bs4.BeautifulSoup(html,features='lxml')  #lxml 是解析的器形式
weather = soup.find_all('div',{'class':'errorMsg dis'}) #<div> 里的 class=什么？这个是条件 爬你要的东西
for i in weather:
    print(i.get_text()) #get_text() 只打印class后的文本
    print(i)